Skip to content

Slide box: a scrim the circle's centred text can be read on - #42

Merged
ecropolis merged 1 commit into
mainfrom
claude/slide-box-circle-scrim
Nov 1, 2026
Merged

ecropolis merged 1 commit into
mainfrom
claude/slide-box-circle-scrim

Conversation

@ecropolis

Copy link
Copy Markdown
Owner

Defect

shape="circle" on the image variant dropped the foot scrim (.slb__body { background: none }) and put a flat rgb(20 24 40 / 0.35) over the whole front instead. On the demo's "The roastery" card (gallery-coast.svg) the white title and line sit on the sand path, and the rendered composite under them is 2.4:1. The 17px text needs 4.5:1; the 19.2px/800 title is large text and needs 3:1. Both failed.

Fix

The circle's ::after now carries the scrim: radial-gradient(closest-side, rgb(20 24 40 / 0.62) 55%, rgb(20 24 40 / 0.38)), darkest under the centred text, lighter at the rim so the photo still reads. --slb-scrim overrides it on the circle as it does the foot gradient on a rectangle; the element header and the catalog's --slb-scrim note now say so and that a circle wants a radial or flat value, not a foot gradient. The circle clip and the slide are untouched (the scrim is on the pseudo-element the old tint used; the body keeps z-index: 1 above it). The rectangle fallback (0.45 / 0.3 at 60%) is unchanged.

Measured

superherotech.ai built in a worktree at origin/main, ELEMENTS_SOURCE pointed at this branch for the whole chain. Headless Chrome (CDP, 1280px wide, 1x) loads /elements/slide-box/, waits for data-ready and the images, hides the title and text (visibility only, so nothing moves), screenshots, and samples every pixel of each text box's bounding rect from the screenshot: the true composite of photo + scrim + tint, not a reconstruction. Contrast is WCAG relative luminance against the text's #fff, reported at the worst pixel.

card box need before (main 47a5331) after (58bdceb)
"The roastery" (circle, gallery-coast.svg) title 19.2px/800 3:1 2.4:1 FAIL 5.23:1 (p5 5.99, median 7.15)
"The roastery" (circle) text 17px/400 4.5:1 2.4:1 FAIL 5.23:1 (p5 5.99, median 7.15)
"Where it grows" (rect, gallery-ridge.svg) title 19.2px/800 3:1 8.06:1 8.06:1
"Where it grows" (rect) text 17px/400 4.5:1 8.75:1 8.75:1

Worst pixel before: rgb(168,167,166), the sand under the 0.35 tint. After: rgb(107,108,114). The ridge card matches the numbers from #40 (8.1 / 8.75), which is the check that the method agrees with the earlier one.

Checks

  • library npm run check: green
  • site npm run build && npm run check with ELEMENTS_SOURCE=<this branch> for the whole chain (prebuild re-fetches main's tarball otherwise): green, 104 pages, vendored at 58bdceb

Do not merge without a look: a merge fires the site's Pages deploy hook.

🤖 Generated with Claude Code

shape="circle" dropped the image variant's foot scrim (the text is in the middle of the
disc, not at its foot) and put a flat 0.35 tint over the whole front instead. On the demo's
coast card the white title and line sat on the sand at 2.4:1, measured from the rendered
pixels; the text needs 4.5:1 and the 19.2px bold title 3:1.

The circle's ::after now carries the scrim: a radial tint, 0.62 to 55% of the radius and
0.38 at the rim, so the middle is dark enough for the text and the rim still shows the
photo. --slb-scrim overrides it there as it does the foot gradient on a rectangle; the header
comment and the catalog note say a circle wants a radial or flat value. Measured on the demo
after: title and text 5.23:1 at the worst pixel. The ridge card is untouched (8.06:1 / 8.75:1).

Co-Authored-By: Claude Fable 5.1 <[email protected]>
@ecropolis
ecropolis merged commit 454c09b into main Nov 1, 2026
2 checks passed
@ecropolis
ecropolis deleted the claude/slide-box-circle-scrim branch November 1, 2026 14:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant